<div id="sidebar">
		<?php 
		$auth = Zend_Auth::getInstance();
		$user = $auth->getIdentity();
		if (!$auth->hasIdentity()) {
		?>
		 <h3>Login</h3>
		 <div id="newsletter" style="margin-bottom:20px;">
                <form action="<?php echo DOMAIN_INDEX ?>/index/login" method="post">
                  <input type="text" value="Username" name="username" onfocus="clearText(this)" onblur="clearText(this)" class="txt_field" />
                  <input type="password" value="Password" name="password" onfocus="clearText(this)" onblur="clearText(this)" class="txt_field" />
                  <input style="float:left" type="submit" name="subscribe" value="Login" alt="Subscribe" id="subscribebtn" title="Subscribe" class="subscribebtn"  />
                </form>
                <div class="cleaner"></div>
                <?php
                if($this->error_login) echo "<p style='color:red;margin-top:10px;'>Sai thông tin đăng nhập!</p>";
                ?>
         </div>
         <?php 
			}
			else{
				echo "<h3>Profile</h3>";
                    $lgNamespace = new Zend_Session_Namespace('enrol_teacher');
        		
			    	if(($lgNamespace->enrol_teacher ==1)){
			    		echo "<p style='margin:0px 5px 5px 0px;'><a href='".DOMAIN_INDEX."/teacher/edit-profile?id=$user->id'>Xin chào, ".$user->name."</a></p>";        

			        }else{
			        	echo "<p style='margin:0px 5px 5px 0px;'><a href='".DOMAIN_INDEX."/student/edit-profile?id=$user->id'>Xin chào, ".$user->name."</a></p>";
			        } 
        ?>
	    <div id="newsletter" style="margin-bottom:45px;">
	     	<a href="<?php echo DOMAIN_INDEX ?>/index/logout"><input style="float:left" type="button" name="subscribe" value="Logout" alt="Subscribe" id="subscribebtn" title="Subscribe" class="subscribebtn"  /></a>
	     </div>
	     <?php } ?>
   	    <h3>Categories</h3>
            <ul class="sidebar_menu">
			    <?php 
			    $lgNamespace = new Zend_Session_Namespace('enrol_teacher');
			    if($lgNamespace->enrol_teacher ==1){
			    	?>
			    	<li><a href="<?php echo DOMAIN_INDEX ?>/index/get-all-course">Danh sách môn dạy</a></li>
			    	
			    	
			    	<?php 
			    }else{ ?>
                    <li><a href="<?php echo DOMAIN_INDEX ?>/student/">Danh sách môn học</a></li>
                    <li><a href="<?php echo DOMAIN_INDEX ?>/index?show=notice">Danh sách thông báo</a></li>
			    <?php }
			    ?>
                
			</ul>
            <h3>Newsletter</h3>
            <p>Praesent aliquam mi id tellus pretium pulvinar in vel ligula.</p>
            
        </div> <!-- END of sidebar -->